package per.sen.shopping.infrastructure.repository;

import io.quarkus.hibernate.reactive.panache.PanacheRepositoryBase;
import io.smallrye.mutiny.Uni;
import jakarta.enterprise.context.ApplicationScoped;
import per.sen.shopping.model.po.SysBackendUserPO;

import java.util.List;

@ApplicationScoped
public class SysBackendUserWriteRepository implements PanacheRepositoryBase<SysBackendUserPO,Long> {

    public  Uni<List<SysBackendUserPO>> findByUsername(String username) {
        return find("username", username).list();
    }

    public  Uni<List<SysBackendUserPO>> findByMobile(String mobile) {
        return find("userMobile", mobile).list();
    }
}
